
<div xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:a="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:ctg="http://www.crotouristguide.com/taglib">
	<h:form>
		<rich:panel styleClass="blue-panel">
			<ctg:status />
			<s:decorate id="wizar" template="/templates/wizard.xhtml">
				<ui:define name="step-title">#{messages['label.suggest.step.title.3']}</ui:define>
				<ui:define name="wizard-img">
					
				</ui:define>
				<ui:define name="step-tip">#{messages['label.suggest.step.tip.3']}</ui:define>
				<ui:define name="step-form">
					<s:decorate id="tipTelefonaDecoration"
						template="/templates/edit.xhtml">
						<ui:define name="label">#{messages['label.phone.type']}</ui:define>
						<h:selectOneMenu id="tipTelefona" 
							styleClass="field" value="#{objektSuggest.telefon.tipTelefona}"
							required="true">
							<s:selectItems id="tipoviTelefona"
								value="#{objektSuggest.tipoviTelefona}" var="tt"
								label="#{messages[stringUtil.merge('label.tip_telefona.',tt.idTipTelefona)]}" noSelectionLabel="#{messages['label.suggest.selectvalue']}" />
							<s:convertEntity />
						</h:selectOneMenu>
					</s:decorate>
					<s:decorate id="kontaktDecoration" template="/templates/edit.xhtml">
						<ui:define name="label">#{messages['label.telefon.kontakt']}</ui:define>
						<h:inputText id="kontaktIme" styleClass="field"
							value="#{objektSuggest.telefon.kontaktIme}">
						</h:inputText>
					</s:decorate>
					<s:decorate id="telBrojDecoration" template="/templates/edit.xhtml">
						<ui:define name="label">#{messages['label.telefon.telbroj']}</ui:define>
						<h:inputText id="telefBroj" styleClass="field"
							value="#{objektSuggest.telefon.telefonskiBroj}" required="true">
						</h:inputText>
					</s:decorate>
					<a:commandButton styleClass="submit" value="#{messages['label.telefon.input.button.addtel']}"
						action="#{objektSuggest.dodajTelefon}" reRender="wizardpanel, tipTelefonaDecoration"/>


				</ui:define>
				<ui:define name="buttn-cancel">
					<h:commandButton styleClass="submit"
							value="#{messages['label.objekt.input.button.update']}"
							action="#{objektSuggest.zapisiObjekt}" rendered="#{objektSuggest.editMode}" immediate="true"/>	
					<ctg:nbsp/>
					<a:commandButton value="#{messages['label.input.cancel']}" action="end" immediate="true" />
				</ui:define>
				<ui:define name="buttn-prev">
					<a:commandButton value="#{messages['label.input.back']}" action="#{objektSuggest.previousStep}"
						reRender="wizardpanel" immediate="true" />
				</ui:define>
				<ui:define name="buttn-next">		
					<a:commandButton value="#{messages['label.input.next']}"
						action="#{objektSuggest.nextStep}" reRender="wizardpanel"
						immediate="true" />
				</ui:define>
				<ui:define name="step-entered-data">
					<s:decorate id="edataXXX">
						<h:dataTable value="#{objektSuggest.uneseniTelefoni}" var="ut"
							rendered="#{! empty objektSuggest.uneseniTelefoni}" rowClasses="rowOdd,rowEven">
							<f:facet name="header">#{messages['label.telefon.list.title']}</f:facet>
							<h:column>
								<f:facet name="header">#{messages['label.phone.type']}</f:facet>
								<h:outputText value="#{messages[stringUtil.merge('label.tip_telefona.',ut.tipTelefona.idTipTelefona)]}" />
							</h:column>
							<h:column>
								<f:facet name="header">#{messages['label.telefon.telbroj']}</f:facet>
								<h:outputText value="#{ut.telefonskiBroj}" />
							</h:column>
							<h:column>
								<f:facet name="header">#{messages['label.telefon.kontakt']}</f:facet>
								<h:outputText value="#{ut.kontaktIme}" />
							</h:column>
							<h:column>
								<f:facet name="header">Akcije</f:facet>
								<a:commandLink styleClass="submit"
									value="#{messages['label.button.remove']}"
									action="#{objektSuggest.ukloniTelefon(ut)}" reRender="wizardpanel, tipTelefonaDecoration" immediate="true"/>
							</h:column>
						</h:dataTable>
					</s:decorate>
				</ui:define>
			</s:decorate>
		</rich:panel>

	</h:form>

</div>